﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartMathLibrary.Space
{
    /// <summary>
    /// This class represents an abstract space object.
    /// </summary>
    public abstract class AbstractSpaceObject : Object, ISpaceEntry
    {
        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        public object Clone()
        {
            return CloneFunctions.Clone(this);
        }

        /// <summary>
        /// Compares the current <see cref="ISpaceEntry"/> to the specified <see cref="ISpaceEntry"/>.
        /// </summary>
        /// <param name="entry">The specified entry to compare.</param>
        /// <returns>
        /// If the object instances are even, the method returns true otherwise, false.
        /// </returns>
        public abstract bool Equals(ISpaceEntry entry);

        /// <summary>
        /// Compares the current <see cref="ISpaceEntry"/> to the specified <see cref="ISpaceEntry"/>.
        /// </summary>
        /// <param name="entry">The specified entry to compare.</param>
        /// <returns>
        /// If the specified object instance is lower than the current instance the method returns true otherwise,
        /// false.
        /// </returns>
        public abstract bool LowerThan(ISpaceEntry entry);

        /// <summary>
        /// Compares the current <see cref="ISpaceEntry"/> to the specified <see cref="ISpaceEntry"/>.
        /// </summary>
        /// <param name="entry">The specified entry to compare.</param>
        /// <returns>
        /// If the specified object instance is greater than the current instance the method returns true otherwise,
        /// false.
        /// </returns>
        public abstract bool GreaterThan(ISpaceEntry entry);
    }
}